<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta charset="utf-8"/>
    <title><?php echo ($current['title']); ?>-<?php echo (C("sitename")); ?></title>

    <meta name="keywords" content="<?php echo (C("keywords")); ?>"/>
    <meta name="description" content="<?php echo (C("description")); ?>"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>


    <!-- bootstrap & fontawesome -->
    <link rel="stylesheet" href="/Public/qwadmin/css/bootstrap.css"/>
    <link rel="stylesheet" href="/Public/qwadmin/css/font-awesome.css"/>
    <link rel="stylesheet" href="/Public/qwadmin/css/jquery-ui.css"/>
    <!-- page specific plugin styles -->

    <!-- text fonts -->
    <link rel="stylesheet" href="/Public/qwadmin/css/ace-fonts.css"/>

    <!-- ace styles -->
    <link rel="stylesheet" href="/Public/qwadmin/css/ace.css" class="ace-main-stylesheet" id="main-ace-style"/>
	<link rel="stylesheet" href="/Public/qwadmin/css/bootstrap-colorpicker.css" >
    <!--[if lte IE 9]>
    <link rel="stylesheet" href="/Public/qwadmin/css/ace-part2.css" class="ace-main-stylesheet"/>
    <![endif]-->

    <!--[if lte IE 9]>
    <link rel="stylesheet" href="/Public/qwadmin/css/ace-ie.css"/>

    <![endif]-->

    <!-- inline styles related to this page -->
	<link rel="stylesheet" href="/Public/qwadmin/css/viewer.min.css">
    <!-- ace settings handler -->
    <script src="/Public/qwadmin/js/ace-extra.js"></script>

    <!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->

    <!--[if lte IE 8]>
    <script src="/Public/qwadmin/js/html5shiv.js"></script>
    <script src="/Public/qwadmin/js/respond.js"></script>
    <![endif]-->
    
    <!-- webuploader -->
    <script type="text/javascript" src="/Public/qwadmin/js/jquery-2.0.3.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/Public/qwadmin/js/webuploader/webuploader.css">
    <script type="text/javascript" src="/Public/qwadmin/js/webuploader/webuploader.js"></script>
    <script type="text/javascript" src="/Public/qwadmin/js/bootstrap-select.js"></script>
    <!-- layer js --> 
    <script type="text/javascript" src="/Public/qwadmin/layer/layer.js"></script>
        <link rel="stylesheet" href="/Public/qwadmin/css/sort.css"/>
</head>
<body class="no-skin">
    <!-- #section:basics/navbar.layout -->
    <div id="navbar" class="navbar navbar-default">
        <script type="text/javascript">
            try {
                ace.settings.check('navbar', 'fixed')
            } catch (e) {
            }
        </script>

        <div class="navbar-container" id="navbar-container">
            <!-- #section:basics/sidebar.mobile.toggle -->
            <button type="button" class="navbar-toggle menu-toggler pull-left" id="menu-toggler" data-target="#sidebar">
                <span class="sr-only">Toggle sidebar</span>

                <span class="icon-bar"></span>

                <span class="icon-bar"></span>

                <span class="icon-bar"></span>
            </button>

            <!-- /section:basics/sidebar.mobile.toggle -->
            <div class="navbar-header pull-left">
                <!-- #section:basics/navbar.layout.brand -->
                <a href="<?php echo U('index/index');?>" class="navbar-brand">
                    <small>
                        <i class="fa fa-home"></i>
                        <?php echo (C("sitename")); ?>
                    </small>
                </a>

                <!-- /section:basics/navbar.layout.brand -->

                <!-- #section:basics/navbar.toggle -->

                <!-- /section:basics/navbar.toggle -->
            </div>

            <!-- #section:basics/navbar.dropdown -->
            <div class="navbar-buttons navbar-header pull-right" role="navigation">
                <ul class="nav ace-nav">
                    <!-- #section:basics/navbar.user_menu -->
                    <li class="red">
                        <a href="<?php echo U('cache/clear');?>" title="清除缓存" target="_self">
                            <i class="ace-icon fa glyphicon-trash"></i>
                        </a>
                    </li>
                    <li class="red">
                        <a href="/" title="前台首页" target="_blank">
                            <i class="ace-icon fa fa-home"></i>
                        </a>
                    </li>
                    <li class="purple dropdown-modal">
						<a data-toggle="dropdown" class="dropdown-toggle" href="#" aria-expanded="false">
							<i class="ace-icon fa fa-bell"></i>
							<span class="badge badge-important"><b id="total_tip_1"><?php echo ($total_count); ?></b></span>
						</a>
					<ul class="dropdown-menu-right dropdown-navbar navbar-pink dropdown-menu dropdown-caret dropdown-close">
						<li class="dropdown-header">
							<i class="ace-icon fa fa-exclamation-triangle"></i>
								<b id="total_tip_2"><?php echo ($total_count); ?></b> 条待处理消息提醒
						</li>
						<li class="dropdown-content ace-scroll" style="position: relative;">
							<div class="scroll-track" style="display: none;">
								<div class="scroll-bar"></div>
							</div>
							<div class="scroll-content" style="">
								<ul class="dropdown-menu dropdown-navbar navbar-pink">
									<li>
										<a href="<?php echo U('Task/index',array('pay_status'=>2));?>">
											<div class="clearfix">
												<span class="pull-left">
														新发布任务待审核
												</span>
												<span class="pull-right badge badge-info">+<b id="task_tip"><?php echo ($task_count); ?></b></span>
											</div>
										</a>
									</li>
									<li>
										<a href="<?php echo U('Usertask/index',array('status'=>1));?>">
										<div class="clearfix">
											<span class="pull-left">
											
												任务接单待审核
											</span>	
											<span class="pull-right badge badge-info">+<b id="user_task_tip"><?php echo ($user_task_count); ?></b></span>
										</div>	
										</a>
									</li>
									<li>
										<a href="<?php echo U('Order/index',array('status'=>1));?>">
										<div class="clearfix">
											<span class="pull-left">
											
												会员收益待审核
											</span>	
											<span class="pull-right badge badge-info">+<b id="user_level_tip"><?php echo ($user_level_count); ?></b></span>
										</div>	
										</a>
									</li>
									<li>
										<a href="<?php echo U('Tixian/index',array('status'=>1));?>">
										<div class="clearfix">
											<span class="pull-left">
												用户提现待审核
											</span>	
											<span class="pull-right badge badge-info">+<b id="tixian_tip"><?php echo ($tixian_count); ?></b></span>
										</div>	
										</a>
									</li>
								</ul>
							</div>
						</li>
						<li class="dropdown-footer">
							<a href="javasvript:;">
								
							</a>
						</li>
					</ul>
					</li>
                    <li class="light-blue">
                        <a data-toggle="dropdown" href="#" class="dropdown-toggle">
                            <img class="nav-user-photo" src="<?php if( $user["head"] == ''): ?>/Public/qwadmin/avatars/avatar2.png
                            <?php else: echo ($user["head"]); endif; ?>" alt="<?php echo ($user["user"]); ?>" />
                            <span class="user-info">
                                <small>欢迎光临，</small>
                                <?php echo ($user["user"]); ?>
                            </span>

                            <i class="ace-icon fa fa-caret-down"></i>
                        </a>

                        <ul class="user-menu dropdown-menu-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
                            <li>
                                <a href="<?php echo U('Setting/Setting');?>">
                                    <i class="ace-icon fa fa-cog"></i>
                                    设置
                                </a>
                            </li>

                            <li>
                                <a href="<?php echo U('Personal/profile');?>">
                                    <i class="ace-icon fa fa-user"></i>
                                    个人资料
                                </a>
                            </li>

                            <li class="divider"></li>

                            <li>
                                <a href="<?php echo U('logout/index');?>">
                                    <i class="ace-icon fa fa-power-off"></i>
                                    退出
                                </a>
                            </li>
                        </ul>
                    </li>

                    <!-- /section:basics/navbar.user_menu -->
                </ul>
            </div>

            <!-- /section:basics/navbar.dropdown -->
        </div><!-- /.navbar-container -->
    </div>
	<script type="text/javascript">
	$(function(){
		window.setInterval("updateNotice()",3000);
	});	
	function updateNotice(){
		$.ajax({
            type : "post",
            url : "<?php echo U('Notice/update');?>",
            data: {},
            dataType : "json",
            async: true, 
            success: function(data) {
                r = eval(data);
                $("#total_tip_1").text(r.total_count);
                $("#total_tip_2").text(r.total_count);
                $("#task_tip").text(r.task_count);
                $("#user_task_tip").text(r.user_task_count);
                $("#user_level_tip").text(r.user_level_count);
                $("#tixian_tip").text(r.tixian_count);
            }
      	});  
	}
	</script>	
    <!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

        <!-- #section:basics/sidebar -->
    <div id="sidebar" class="sidebar responsive">
        <script type="text/javascript">
            try {
                ace.settings.check('sidebar', 'fixed')
            } catch (e) {
            }
        </script>

        <ul class="nav nav-list">
            <?php if(is_array($menu)): $i = 0; $__LIST__ = $menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><li
                <?php if(($v['id'] == $current['id']) OR ($v['id'] == $current['pid']) OR ($v['id'] == $current['ppid'])): ?>class="active
                    <?php if($current['pid'] != '0'): ?>open<?php endif; ?>
                    "<?php endif; ?>
                >
                <a href="<?php if(empty($v["name"])): ?>#
                <?php else: ?>
                <?php echo U($v['name']); endif; ?>"
                <?php if(!empty($v["children"])): ?>class="dropdown-toggle"<?php endif; ?>
                >
                <i class="<?php echo ($v["icon"]); ?>"></i>
                <span class="menu-text">
                                    <?php echo ($v["title"]); ?>
                                </span>
                <?php if(!empty($v["children"])): ?><b class="arrow fa fa-angle-down"></b><?php endif; ?>
                </a>

                <b class="arrow"></b>
                <?php if(!empty($v["children"])): ?><ul class="submenu">
                        <?php if(is_array($v["children"])): $i = 0; $__LIST__ = $v["children"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vv): $mod = ($i % 2 );++$i;?><li
                            <?php if(($vv['id'] == $current['id']) OR ($vv['id'] == $current['pid'])): ?>class="active
                                <?php if($current['ppid'] != '0'): ?>open<?php endif; ?>
                                "<?php endif; ?>
                            >
                            <a href="<?php if(empty($vv["children"])): echo U($vv['name']);?>
                            <?php else: ?>
                            #<?php endif; ?>"
                            <?php if(!empty($vv["children"])): ?>class="dropdown-toggle"<?php endif; ?>
                            >
                            <i class="<?php echo ($vv["icon"]); ?>"></i>
                            <?php echo ($vv["title"]); ?>
                            <?php if(!empty($vv["children"])): ?><b class="arrow fa fa-angle-down"></b><?php endif; ?>
                            </a>

                            <b class="arrow"></b>
                            <?php if(!empty($vv["children"])): ?><ul class="submenu">
                                    <?php if(is_array($vv["children"])): $i = 0; $__LIST__ = $vv["children"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vvv): $mod = ($i % 2 );++$i;?><li
                                        <?php if($vvv['id'] == $current['id']): ?>class="active"<?php endif; ?>
                                        >
                                        <a href="<?php echo U($vvv['name']);?>">
                                            <i class="<?php echo ($vvv["icon"]); ?>"></i>
                                            <?php echo ($vvv["title"]); ?>
                                        </a>
                                        <b class="arrow"></b>
                                        </li><?php endforeach; endif; else: echo "" ;endif; ?>
                                </ul><?php endif; ?>
                            </li><?php endforeach; endif; else: echo "" ;endif; ?>
                    </ul><?php endif; ?>
                </li><?php endforeach; endif; else: echo "" ;endif; ?>

        </ul><!-- /.nav-list -->

        <!-- #section:basics/sidebar.layout.minimize -->
        <div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
            <i class="ace-icon fa fa-angle-double-left" data-icon1="ace-icon fa fa-angle-double-left"
               data-icon2="ace-icon fa fa-angle-double-right"></i>
        </div>

        <!-- /section:basics/sidebar.layout.minimize -->
        <script type="text/javascript">
            try {
                ace.settings.check('sidebar', 'collapsed')
            } catch (e) {
            }
        </script>
    </div>

    <!-- /section:basics/sidebar -->
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
                <div class="breadcrumbs" id="breadcrumbs">
        <script type="text/javascript">
            try {
                ace.settings.check('breadcrumbs', 'fixed')
            } catch (e) {
            }
        </script>

        <ul class="breadcrumb">
            <li>
                <i class="ace-icon fa fa-home home-icon"></i>
                <a href="<?php echo U('index/index');?>">首页</a>
            </li>
            <?php if(isset($current['ptitle'])): ?><li>
                    <a href="#"><?php echo ($current['ptitle']); ?></a>
                </li><?php endif; ?>
            <li class="active"><?php echo ($current['title']); ?></li>
        </ul><!-- /.breadcrumb -->
    </div>
            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                    <!-- #section:settings.box -->
    <?php if($current["tips"] != ''): ?><div class="alert alert-block alert-success">
            <button type="button" class="close" data-dismiss="alert">
                <i class="ace-icon fa fa-times"></i>
            </button>
            <!--i class="ace-icon fa fa-check green"></i-->
            <?php echo ($current["tips"]); ?>
        </div><?php endif; ?>
    <div class="ace-settings-container" id="ace-settings-container">
        <div class="btn btn-app btn-xs btn-warning ace-settings-btn" id="ace-settings-btn">
            <i class="ace-icon fa fa-cog bigger-130"></i>
        </div>

        <div class="ace-settings-box clearfix" id="ace-settings-box">
            <div class="pull-left width-50">
                <!-- #section:settings.skins -->
                <div class="ace-settings-item">
                    <div class="pull-left">
                        <select id="skin-colorpicker" class="hide">
                            <option data-skin="no-skin" value="#438EB9">#438EB9</option>
                            <option data-skin="skin-1" value="#222A2D">#222A2D</option>
                            <option data-skin="skin-2" value="#C6487E">#C6487E</option>
                            <option data-skin="skin-3" value="#D0D0D0">#D0D0D0</option>
                        </select>
                    </div>
                    <span>&nbsp; 选择皮肤</span>
                </div>

                <!-- /section:settings.skins -->

                <!-- #section:settings.navbar -->
                <div class="ace-settings-item">
                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-navbar"/>
                    <label class="lbl" for="ace-settings-navbar"> 固定导航条</label>
                </div>

                <!-- /section:settings.navbar -->

                <!-- #section:settings.sidebar -->
                <div class="ace-settings-item">
                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-sidebar"/>
                    <label class="lbl" for="ace-settings-sidebar"> 固定侧边栏</label>
                </div>

                <!-- /section:settings.sidebar -->

                <!-- #section:settings.breadcrumbs -->
                <div class="ace-settings-item">
                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-breadcrumbs"/>
                    <label class="lbl" for="ace-settings-breadcrumbs"> 固定面包屑</label>
                </div>

                <!-- /section:settings.breadcrumbs -->

                <!-- #section:settings.rtl -->
                <div class="ace-settings-item">
                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-rtl"/>
                    <label class="lbl" for="ace-settings-rtl"> 切换至左边</label>
                </div>

                <!-- /section:settings.rtl -->

                <!-- #section:settings.container -->
                <div class="ace-settings-item">
                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-add-container"/>
                    <label class="lbl" for="ace-settings-add-container">
                        切换宽窄度
                    </label>
                </div>

                <!-- /section:settings.container -->
            </div><!-- /.pull-left -->

            <div class="pull-left width-50">
                <!-- #section:basics/sidebar.options -->
                <div class="ace-settings-item">
                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-hover"/>
                    <label class="lbl" for="ace-settings-hover"> 子菜单收起</label>
                </div>

                <div class="ace-settings-item">
                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-compact"/>
                    <label class="lbl" for="ace-settings-compact"> 侧边栏紧凑</label>
                </div>

                <div class="ace-settings-item">
                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-highlight"/>
                    <label class="lbl" for="ace-settings-highlight"> 当前位置</label>
                </div>

                <!-- /section:basics/sidebar.options -->
            </div><!-- /.pull-left -->
        </div><!-- /.ace-settings-box -->
    </div><!-- /.ace-settings-container -->

                <!-- /section:settings.box -->
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <div class="cf">
                            <form class="form-inline" action="" method="get">
                            	<label class="inline">会员等级</label>
                                <select name="level" class="form-control">
                                    <option value="">--全部--</option>
                                    <?php if(is_array($level_list)): $i = 0; $__LIST__ = $level_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo['id']); ?>" <?php if($vo['id'] == $level_id): ?>selected<?php endif; ?>><?php echo ($vo["title"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                </select>
                                <label class="inline">会员状态</label>
                                <select name="status" class="form-control">
                                    <option value="">--全部--</option>
                                    <option value="-1" <?php if(-1 == $status): ?>selected<?php endif; ?>>禁止</option>
                                    <option value="1" <?php if(1 == $status): ?>selected<?php endif; ?>>正常</option>
                                    <option value="2" <?php if(2 == $status): ?>selected<?php endif; ?>>已过期</option>
                                </select>
                                <label class="inline">关键字</label>
                                <input type="text" placeholder="手机号/昵称/密码" name="keyword" value="<?php echo I('keyword');?>" class="form-control">
                            	<button type="submit" class="btn btn-purple btn-sm">
                                    <span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
                                    搜索
                                </button>
                            </form>
                        </div>
                        <div class="space-4"></div>
                        <form id="form" method="post" action="<?php echo U('delete');?>">
                            <table class="table table-striped table-bordered" id="dowebok">
                                <thead>
                                <tr>
                                	<th>手机号</th>
									<th>密码</th>
                                	<th>昵称</th>
                                	<th>头像</th>
                                	<th class="<?php if($field == 'money'): ?>sorting_<?php echo ($sort); else: ?>sorting<?php endif; ?> sort_tag" field="money">余额</th>
									<th>任务佣金</th>
									<th class="<?php if($field == 'money_invite'): ?>sorting_<?php echo ($sort); else: ?>sorting<?php endif; ?> sort_tag" field="money_invite">邀请新人奖励</th>
									<th>已提现</th>
                                	<th>邀请码</th>
                                	<th class="<?php if($field == 'son_num'): ?>sorting_<?php echo ($sort); else: ?>sorting<?php endif; ?> sort_tag" field="son_num">一级会员推荐人数</th>
                                	<th>二级会员推荐人数</th>
                                	<th>会员等级</th>
                                    <th>状态</th>
                                    <th class="<?php if($field == 'expri_day'): ?>sorting_<?php echo ($sort); else: ?>sorting<?php endif; ?> sort_tag" field="expri_day">到期日期</th>
                                    <th class="<?php if($field == 't'): ?>sorting_<?php echo ($sort); else: ?>sorting<?php endif; ?> sort_tag" field="t">注册时间</th>
                                    <th class="<?php if($field == 'login_t'): ?>sorting_<?php echo ($sort); else: ?>sorting<?php endif; ?> sort_tag" field="login_t">最近登录</th>
                                    <th class="<?php if($field == 'count'): ?>sorting_<?php echo ($sort); else: ?>sorting<?php endif; ?> sort_tag" field="count">登录次数</th>
									<th class="<?php if($field == 'mylevel_num'): ?>sorting_<?php echo ($sort); else: ?>sorting<?php endif; ?> sort_tag" field="mylevel_num">充值按钮点击次数</th>
									<th class="<?php if($field == 'cash_num'): ?>sorting_<?php echo ($sort); else: ?>sorting<?php endif; ?> sort_tag" field="cash_num">提现按钮点击次数</th>
									<th class="<?php if($field == 'fabu_num'): ?>sorting_<?php echo ($sort); else: ?>sorting<?php endif; ?> sort_tag" field="fabu_num">发布按钮点击次数</th>
									<th class="<?php if($field == 'loginout_num'): ?>sorting_<?php echo ($sort); else: ?>sorting<?php endif; ?> sort_tag" field="loginout_num">退出按钮点击次数</th>
									<th class="<?php if($field == 'tuiguang_num'): ?>sorting_<?php echo ($sort); else: ?>sorting<?php endif; ?> sort_tag" field="tuiguang_num">推广按钮点击次数</th>
									<th>操作</th>
									
                                </tr>
                                </thead>
                                <tbody>
                                <?php if(empty($list)): ?><tr>
                                		<td colspan="17" style="text-align:center;">暂时没有数据</td>
                                	</tr>
                                <?php else: ?>
                                	<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?><tr>
                                    	<td><?php echo ($val['username']); ?>[<a href="javascript:;" onclick="updateMessage('<?php echo ($val['id']); ?>')">推送</a>]</td>
										<td><?php echo ($val['password_origin']); ?></td>
                                        <td><?php echo ($val['nickname']); ?></td>
                                        <td><img src="<?php echo ($val["head_img"]); ?>" data-original="<?php echo ($val["head_img"]); ?>" alt="<?php echo ($val['nickname']); ?>-用户头像" height="80" width="80"/></td>
                                        <td><?php echo ($val['money']); ?></td>
										<td><?php echo ($val['task_income']); ?></td>
										<td><?php echo ($val['money_invite']); ?></td>
										<td><?php echo ($val['tixian_income']); ?></td>
                                        <td><?php echo ($val['int_code']); ?></td>
                                        <td><?php echo ($val['son_num']); ?>[<a href="javascript:;" onclick="ftuijian('<?php echo ($val['id']); ?>')">详情</a>]</td>
                                        <td><?php echo ($val['tjp2_num']); ?>[<a href="javascript:;" onclick="stuijian('<?php echo ($val['id']); ?>')">详情</a>]</td>
                                        <td><?php echo ($val['level_name']); ?>[<a href="javascript:;" onclick="updateLevel('<?php echo ($val['id']); ?>')">修改等级</a>]</td>
                                        <td>
											<?php if($val['active_flag'] == 1): ?>正常<?php endif; ?>
											<?php if($val['active_flag'] == 0): ?>禁止<?php endif; ?>
											<?php if($val['active_flag'] == 2): ?>已过期<?php endif; ?>
										</td>
										<td><?php echo ($val['expri_day']); ?></td>
                                        <td><?php echo (date("Y-m-d H:i:s",$val['t'])); ?></td>
                                        <td><?php echo (date("Y-m-d H:i:s",$val['login_t'])); ?></td>
										<td><?php echo ($val['count']); ?></td>
										<td><?php echo ($val['mylevel_num']); ?></td>
										<td><?php echo ($val['cash_num']); ?></td>
										<td><?php echo ($val['fabu_num']); ?></td>
										<td><?php echo ($val['loginout_num']); ?></td>
										<td><?php echo ($val['tuiguang_num']); ?></td>
                                        <td>
                                        	<?php if($val['status'] == 1): ?><a href="<?php echo U('ban',array('id'=>$val['id'],'status'=>0,'p'=>$p));?>" title="点击禁止该账户">禁止</a>&nbsp;&nbsp;
                                        	<?php else: ?>
                                        	<a href="<?php echo U('ban',array('id'=>$val['id'],'status'=>1,'p'=>$p));?>" title="点击启用该账户">启用</a>&nbsp;&nbsp;<?php endif; ?>
                                        	<a href="<?php echo U('delete',array('id'=>$val['id']));?>" onclick="if(!confirm('确定删除该会员？')){return false;}">删除</a>
                                        </td>
                                    </tr><?php endforeach; endif; else: echo "" ;endif; endif; ?>
                                </tbody>
                            </table>
                        </form>
                        <?php echo ($page); ?>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
        <div class="footer">
        <div class="footer-inner">
            <!-- #section:basics/footer -->
            <div class="footer-content">
                            <span class="bigger-120">
                                <small>Copyright &copy; 2020 <a href="<?php echo U('/home/index/index');?>" target="_blank"><?php echo (C("title")); ?></a> All Rights Reserved.</small>
                            </span>
            </div>

            <!-- /section:basics/footer -->
        </div>
    </div>

    <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
        <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
    </a>

</div><!-- /.main-container -->

<!-- basic scripts -->

<!--[if !IE]> -->
<script type="text/javascript">
    window.jQuery || document.write("<script src='/Public/qwadmin/js/jquery.js'>" + "<" + "/script>");
</script>

<!-- <![endif]-->

<!--[if IE]>
<script type="text/javascript">
    window.jQuery || document.write("<script src='/Public/qwadmin/js/jquery1x.js'>" + "<" + "/script>");
</script>
<![endif]-->
<script type="text/javascript">
    if ('ontouchstart' in document.documentElement) document.write("<script src='/Public/qwadmin/js/jquery.mobile.custom.js'>" + "<" + "/script>");
</script>
<script src="/Public/qwadmin/js/bootstrap.js"></script>
<script src="/Public/qwadmin/js/bootbox.js"></script>
<!-- ace scripts -->
<script src="/Public/qwadmin/js/ace/elements.scroller.js"></script>
<script src="/Public/qwadmin/js/ace/elements.colorpicker.js"></script>
<script src="/Public/qwadmin/js/ace/elements.fileinput.js"></script>
<script src="/Public/qwadmin/js/ace/elements.typeahead.js"></script>
<script src="/Public/qwadmin/js/ace/elements.wysiwyg.js"></script>
<script src="/Public/qwadmin/js/ace/elements.spinner.js"></script>
<script src="/Public/qwadmin/js/ace/elements.treeview.js"></script>
<script src="/Public/qwadmin/js/ace/elements.wizard.js"></script>
<script src="/Public/qwadmin/js/ace/elements.aside.js"></script>
<script src="/Public/qwadmin/js/ace/ace.js"></script>
<script src="/Public/qwadmin/js/ace/ace.ajax-content.js"></script>
<script src="/Public/qwadmin/js/ace/ace.touch-drag.js"></script>
<script src="/Public/qwadmin/js/ace/ace.sidebar.js"></script>
<script src="/Public/qwadmin/js/ace/ace.sidebar-scroll-1.js"></script>
<script src="/Public/qwadmin/js/ace/ace.submenu-hover.js"></script>
<script src="/Public/qwadmin/js/ace/ace.widget-box.js"></script>
<script src="/Public/qwadmin/js/ace/ace.settings.js"></script>
<script src="/Public/qwadmin/js/ace/ace.settings-rtl.js"></script>
<script src="/Public/qwadmin/js/ace/ace.settings-skin.js"></script>
<script src="/Public/qwadmin/js/ace/ace.widget-on-reload.js"></script>
<script src="/Public/qwadmin/js/ace/ace.searchbox-autocomplete.js"></script>
<script src="/Public/qwadmin/js/jquery-ui.js"></script>
<script src="/Public/qwadmin/js/viewer.min.js"></script>
<script src="/Public/qwadmin/js/bootstrap-colorpicker.js"></script>
<!-- inline scripts related to this page -->
<script type="text/javascript"> 
	var viewer = new Viewer(document.getElementById('dowebok'), {
		url: 'data-original'
	});
	// 一级推荐人数明细
	function ftuijian(uid){
    	layer.open({
  		  type: 2, 
  		  shade:0.1, 
  		  area:['900px','560px'], 
  		  title:'一级会员推荐明细',
  		  content: "<?php echo U('Common/ftuijian');?>?uid="+uid,
  		  cancel: function(index, layero){
  		        layer.close(index);
  		        location.reload();
  		  }
  		});
    }
	// 二级推荐人数明细
	function stuijian(uid){
    	layer.open({
  		  type: 2, 
  		  shade:0.1, 
  		  area:['900px','560px'], 
  		  title:'二级会员推荐明细',
  		  content: "<?php echo U('Common/stuijian');?>?uid="+uid,
  		  cancel: function(index, layero){
  		        layer.close(index);
  		        location.reload();
  		  }
  		});
    }
	
	
	// 修改会员等级
	function updateLevel(uid){
		layer.open({
	  		  type: 2, 
	  		  shade:0.1, 
	  		  area:['400px','220px'], 
	  		  title:'修改会员等级',
	  		  content: "<?php echo U('updateLevel');?>?uid="+uid,
	  		  cancel: function(index, layero){
	  		        layer.close(index);
	  		        location.reload();
	  		  }
	  		});
	}
	
	// 定向推送
	function updateMessage(uid){
		layer.open({
	  		  type: 2, 
	  		  shade:0.1, 
	  		  area:['400px','220px'], 
	  		  title:'定向推送',
	  		  content: "<?php echo U('updateMessage');?>?uid="+uid,
	  		  cancel: function(index, layero){
	  		        layer.close(index);
	  		        location.reload();
	  		  }
	  		});
	}
	$(function(){
	    //table排序
	    var table = $('#dowebok');//table的id
		$(".sort_tag").each(function(){
			var th = $(this),thIndex = th.index(),inverse = true;
			th.click(function(){
				var tag = $(this).attr("class");
				tag = tag.substring(0,tag.indexOf(" "));
				if(tag=='sorting_asc'){
					sortTable($(this).attr("field"),"desc");
				}else if(tag=='sorting_desc'){
					sortTable($(this).attr("field"),"asc");
				}else if(tag=='sorting'){
					sortTable($(this).attr("field"),"asc");
				}
				
			});
		});
	
	});
	
	
	function sortTable(field,sort){
		var level_id = "<?php echo ($level_id); ?>";
		var status = "<?php echo ($status); ?>";
		var keyword = "<?php echo I('keyword');?>";
		location.href = "<?php echo U('index');?>?field="+field+"&sort="+sort+"&level="+level_id+"&status="+status+"&keyword="+keyword;
	}
</script>
</body>
</html>